{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "1f17b629",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'E:\\\\python_new\\\\可视化\\\\4.实验六\\\\波浪水球图.html'"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "##波浪水球图\n",
    "from pyecharts.charts import Liquid\n",
    "from pyecharts import options as opts\n",
    "\n",
    "# 创建水球图对象\n",
    "c = (\n",
    "    Liquid()\n",
    "    # 设置数据系列名称及数据，is_outline_show是设置边框线\n",
    "    .add(\"完成率\", [0.65], is_outline_show=False)\n",
    "    # 设置图表标题及位置\n",
    "    .set_global_opts(title_opts=opts.TitleOpts(title=\"2022年上半年目标完成率\", pos_left=\"center\"))\n",
    "    # 渲染为html\n",
    "    .render(\"波浪水球图.html\")\n",
    ")\n",
    "\n",
    "c"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
